From faa6800af9049e2c825703ffb70bb89393a8a15b Mon Sep 17 00:00:00 2001 From: "K. Handa" Date: Mon, 8 Jul 2013 20:51:42 +0900 Subject: [PATCH] decoder-tests.el (decoder-tests-prefer-utf-8-read): Use with-ccoding-priority to avoid side-effect (Bug#14781). --- test/automated/decoder-tests.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/automated/decoder-tests.el b/test/automated/decoder-tests.el index e1b05faf3c0..2e99fd7f115 100644 --- a/test/automated/decoder-tests.el +++ b/test/automated/decoder-tests.el @@ -213,10 +213,9 @@ ;; PREFER is non-nil, prefer that coding system before reading. (defun decoder-tests-prefer-utf-8-read (file detect prefer) - (if prefer - (prefer-coding-system prefer)) (with-temp-buffer - (insert-file-contents file) + (with-coding-priority (if prefer (list prefer)) + (insert-file-contents file)) (if (eq buffer-file-coding-system detect) nil (format "Invalid detection: %s" buffer-file-coding-system)))) -- 2.30.2